/**
 * @ClassName LC1385
 * @Author ykx
 * @Date 2024/7/6 12:21
 * @Version 1.0
 */
public class LC1385 {
    public static void main(String[] args) {

    }

    public int findTheDistanceValue(int[] arr1, int[] arr2, int d) {
        int result = 0;
        for (int a1 : arr1) {
            boolean flag = true;
            for (int a2 : arr2) {
                if (Math.abs(a1 - a2) <= d) {
                    flag = false;
                    break;
                }
            }
            if (flag) {
                result++;
            }
        }
        return result;
    }

}
